import request from '@/utils/request'
import {use} from "element-ui/src/locale";

// 查询用户报障对象列表
export function listReport(query) {
  return request({
    url: '/domain/report/list',
    method: 'get',
    params: query
  })
}

// 查询用户报障对象详细
export function getReportDetail(reportId, houseId, userId) {
  return request({
    url: '/domain/report/' + reportId + '/' + houseId + '/' + userId,
    method: 'get'
  })
}

// 查询用户报障对象详细
export function getReport(reportId) {
  return request({
    url: '/domain/report/' + reportId,
    method: 'get'
  })
}

// 新增用户报障对象
export function addReport(data) {
  return request({
    url: '/domain/report',
    method: 'post',
    data: data
  })
}

// 修改用户报障对象
export function updateReport(data) {
  return request({
    url: '/domain/report',
    method: 'put',
    data: data
  })
}

// 删除用户报障对象
export function delReport(reportId) {
  return request({
    url: '/domain/report/' + reportId,
    method: 'delete'
  })
}

//中介处理报障
export function handleReport(data) {
  return request({
    url: '/domain/report/handle',
    method: 'put',
    data: data
  })
}
